package com.fz.mapper;

import com.fz.entity.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


/**
 * Created by Z-C-Y on 2018-02-05.
 */
@Service("studentdao")
public interface StudentMapper {
    /*查新所有的 学生*/
   @Select("select * from student")
    public List<Student> query();

   /*根据id查询所有的 学生*/
    public Student queryById(int id);

    /*添加*/
    @Insert("insert into student values(null,#{name},#{age})")
    public int save(Map<String, Object> values);

    /*根据id进行删除*/
    public int delete(int id);

    /*修改*/
    public int update(Student student);
   // public int update(Map<String,Object> map);



}
